Version

AddCollectionChange<TItem>(ICollection<TItem>,TItem[],String) Method

Adds an UndoUnit to the undo history for a collection change that replaces the contents of the collection.
Syntax
'Declaration
 
Public Overloads Function AddCollectionChange(Of TItem)( _
   ByVal collection As ICollection(Of TItem), _
   ByVal items() As TItem, _
   Optional ByVal itemTypeDisplayName As String _
) As UndoUnit
public UndoUnit AddCollectionChange<TItem>( 
   ICollection<TItem> collection,
   TItem[] items,
   string itemTypeDisplayName
)

Parameters

collection
The collection that was modified
items
The items to restore when the operation is undone
itemTypeDisplayName
A string representing the type of items in the collection as they should be presented to the end user or null to use the type name and/or item.

Type Parameters

TItem
The type of the item

Return Value

Returns the UndoUnit that was added or null if one was not added
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also